package com.yunhe.controller;



import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yunhe.entity.Cars;
import com.yunhe.service.CarsService;

@Controller
public class LoginController {
	
	
	private CarsService carsService;

	
	@RequestMapping(value="/index.html")
	public String login(){
		//carsService.te();
		return "index";
	}
	
	
	
	@RequestMapping(value="/ajax1.html")
	public @ResponseBody Cars ajax1(){
		//carsService.te();
		
		Cars cars=new Cars();
		cars.setCarbrand("1");
				
		return cars;		
	}
	
	
	

	@Autowired
	@Qualifier("CarsService")
	public void setCarsService(CarsService carsService) {
		this.carsService = carsService;
	}
	
	

}
